#pragma once

class CAddArticleDlg 
	: public CBkDialogImpl<CAddArticleDlg>
	,public CWHRoundRectFrameHelper<CAddArticleDlg>
{
public:
	CAddArticleDlg(CString strTl,CString url)
		: CBkDialogImpl<CAddArticleDlg>(IDR_BK_ADDARTICLE_DLG)
		,m_strTitle(strTl)
		,m_strUrl(url)
	{
		
	}

	~CAddArticleDlg(void)
	{		
	}
	BOOL doApply();
	LRESULT		OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	BOOL		OnInitDialog(HWND wParam, LPARAM lParam);	
	LRESULT		OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	void		OnBkBtnClose();
	void		OnBkBtnSure();	
	CString		GetTitle();
	
public:
	BK_NOTIFY_MAP(IDC_RICHVIEW_WIN);
		BK_NOTIFY_ID_COMMAND(IDC_BTN_SYS_CLOSE,					OnBkBtnClose)
		BK_NOTIFY_ID_COMMAND(IDC_BTN_DLG_OK,			OnBkBtnSure)
		BK_NOTIFY_ID_COMMAND(IDC_BTN_DLG_CANCEL,		OnBkBtnClose)			
	BK_NOTIFY_MAP_END()

	BEGIN_MSG_MAP_EX(CAddArticleDlg)	
		MSG_BK_NOTIFY(IDC_RICHVIEW_WIN)
		CHAIN_MSG_MAP(CBkDialogImpl<CAddArticleDlg>)
		CHAIN_MSG_MAP(CWHRoundRectFrameHelper<CAddArticleDlg>)
		MESSAGE_HANDLER(WM_CREATE,				OnCreate)
		MESSAGE_HANDLER(WM_DESTROY,				OnDestroy)	
		MSG_WM_INITDIALOG(OnInitDialog)	

		REFLECT_NOTIFICATIONS_EX()
	END_MSG_MAP()		 

private:
	void _init();
	CEdit			m_wndEditTitle;
	CString			m_strTitle;
	CString			m_strUrl;
};